UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TZV8j9g8kbdOoywQMdjJ0gmSbvml2R6qTeLdRboGBFY='
WHERE
key_id = '2113437429650e484c3adfa43c99f142145be66eebb340085067b63e1866e7bc'
AND (
token = 'TZV8j9g8kbdOoywQMdjJ0gmSbvml2R6qTeLdRboGBFY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)