UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y+EyXuvuMv2IS4wovvjzzM9kxYKmo9uaCAFK4OfO12E='
WHERE
key_id = '7ee0ea95ebf3aaabfb58b7848d4e70b443859cb21291693b4c1846c8dfa3c65f'
AND (
token = 'y+EyXuvuMv2IS4wovvjzzM9kxYKmo9uaCAFK4OfO12E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)