UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1u1tFdNDqbqsT6bxvngmOgyvqX+QFgWixWcJcnJzcSQ='
WHERE
key_id = '83fa1263cf38551cea4602174dd52f59451f179bde78841b77f57e8e4882e2db'
AND (
token = '1u1tFdNDqbqsT6bxvngmOgyvqX+QFgWixWcJcnJzcSQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)