UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sYtt/mx+zbINHYk/h1QzqSQBZketltvRKR8rCoj93lM='
WHERE
key_id = '418a63a1b51df0ff37614e63e6bddd437ffe2d80ce2a1f88c2cc9607855b12bc'
AND (
token = 'sYtt/mx+zbINHYk/h1QzqSQBZketltvRKR8rCoj93lM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)