UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wvoqdKOdaQIMHvobRINseWGHY7tyd39vMUsS4ufQlv0='
WHERE
key_id = '27dead01526ba1469d1da7ddfdac7321ebf0caeeed9be3df693fcfc3b50ef35b'
AND (
token = 'wvoqdKOdaQIMHvobRINseWGHY7tyd39vMUsS4ufQlv0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)