UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'arWO425+QGSQdW4cOQpdtqpGvMUbrixj/UfsyszL90g='
WHERE
key_id = '926e6e829c5909f7d8bc2d87a6c401116adb8d741dab4f93818c24a2d0d64711'
AND (
token = 'arWO425+QGSQdW4cOQpdtqpGvMUbrixj/UfsyszL90g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)