UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+RXHpiUOogO8WmYRrW3gyxEj9+mHn3brrMzexsXfNLg='
WHERE
key_id = '2a1b15dbbaf60808df26b1fc087d748ae66c7eabff78606cdeb1a41804bbff19'
AND (
token = '+RXHpiUOogO8WmYRrW3gyxEj9+mHn3brrMzexsXfNLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)