UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2Z8OhMR3QK1QXIN6D3T6aCQkKDzHlyxUwD7z0p8nSiM='
WHERE
key_id = 'eb32fada68df127eb3b4d9e519f6b5efcd5f518a7d0d44cd628942e7c4dca477'
AND (
token = '2Z8OhMR3QK1QXIN6D3T6aCQkKDzHlyxUwD7z0p8nSiM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)