UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7c6nBXrAlIya1xbYKWbViNzNpJq3k3VmIizbiKiNFDY='
WHERE
key_id = '5ac73bbe00645d23db45b56dc59a0e9f96eace4327f1c2252c8cedc782b498bc'
AND (
token = '7c6nBXrAlIya1xbYKWbViNzNpJq3k3VmIizbiKiNFDY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)