UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vwplvqtYO1IkYxtw3pQ2K1frCGls1dnzoTYdFY7SpLM='
WHERE
key_id = '55d6cc834f0a8216883c09e76390e39fe40bd1874aa8824dfc12f9287e2739da'
AND (
token = 'vwplvqtYO1IkYxtw3pQ2K1frCGls1dnzoTYdFY7SpLM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)