UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '63zhAsif7u5AnwtZJTxm9r7xYQMZz0jDSl/Mf3vyLho='
WHERE
key_id = 'fdb517ea7e2b32fae832352d1b8ee3853ae1d2ab775d0901f7bab49d82eb3add'
AND (
token = '63zhAsif7u5AnwtZJTxm9r7xYQMZz0jDSl/Mf3vyLho='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)