UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LMShtyATlWOOG/VBQs+KyNMOacOhd6DmAX/QE8SjnUQ='
WHERE
key_id = '7f0b1ed189f5f800c5de70ad63dc653c49561f845941dd9a0508834b96564fe9'
AND (
token = 'LMShtyATlWOOG/VBQs+KyNMOacOhd6DmAX/QE8SjnUQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)