UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'c8ZyiLcjMFVvLRnXhXU7l/v3//ggB9r7otqc6JvAh5g='
WHERE
key_id = 'a68fe8e410f0991d90bc1bbcd9ca9ce6c511d02e6a6b43b82f167bf6b3955d00'
AND (
token = 'c8ZyiLcjMFVvLRnXhXU7l/v3//ggB9r7otqc6JvAh5g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)