UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wk4we2/7Nv+8/SIubZYaPIOZQnxpZ0XvDfzIcsEkctY='
WHERE
key_id = '4ed5dd4d88166d09e4224b6ded0da6ec2224bd6f28ff87c5fd0e5cf4e05d45c5'
AND (
token = 'wk4we2/7Nv+8/SIubZYaPIOZQnxpZ0XvDfzIcsEkctY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)