UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UxX75CxLuO6AmauBJe58R+GqPC00wAZ++f5nafDmC+Y='
WHERE
key_id = 'ec7f1054e9b7c6a726af88cbfd24dda8974657a015c6fc74a50f9df62a020b13'
AND (
token = 'UxX75CxLuO6AmauBJe58R+GqPC00wAZ++f5nafDmC+Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)