UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L68iSnvp/KEDk9ojqXjg9QvNoplZdYWZnH2l26mFY9o='
WHERE
key_id = 'f8dcdf8906fd24fde5aa923ae46fd2f91c6787402d386232d400ddff44271b09'
AND (
token = 'L68iSnvp/KEDk9ojqXjg9QvNoplZdYWZnH2l26mFY9o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)