UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8LxYcpa2yvCF5k7IwqWiJ/qoMUJacD6jkURzjM60WvU='
WHERE
key_id = '5bb6c94bf7bacd3722a50ae0782e9592200064b43a474571af73abffe68acab9'
AND (
token = '8LxYcpa2yvCF5k7IwqWiJ/qoMUJacD6jkURzjM60WvU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)