UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '741sKmARuw+6kiBSAiUXZTc9J6pnsqd7rqdk/BRsGIQ='
WHERE
key_id = 'cac481520dff26da3a47db24d05089beb50feee2757500ac5cb545eca3c6088d'
AND (
token = '741sKmARuw+6kiBSAiUXZTc9J6pnsqd7rqdk/BRsGIQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)