UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LFjChuPtaworNoz/lZDULJnO9n90aZ0ZiyLldTISIYM='
WHERE
key_id = 'e025660a6dc871fb4336857874f5a6c8fba8ea6bcf9133ca92f8aa26a30eb33e'
AND (
token = 'LFjChuPtaworNoz/lZDULJnO9n90aZ0ZiyLldTISIYM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)