UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EIPQphRTCA+0iIqJdMTO9Bcxt9/Kbfyry0Y5ZYepJko='
WHERE
key_id = '86bcabf5bd5ebf1fc1597851f7ef4e0d2c5744ee8f11253d7e0b9283e8d94c39'
AND (
token = 'EIPQphRTCA+0iIqJdMTO9Bcxt9/Kbfyry0Y5ZYepJko='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)