UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mb2w/x1RANokOF+VP7DiYKhr4QhQI4aYJ+MnB7OYzls='
WHERE
key_id = '2f70a9eea65e413eb7213b69705be0037eefc4512b4d820a92ef82ab83505397'
AND (
token = 'Mb2w/x1RANokOF+VP7DiYKhr4QhQI4aYJ+MnB7OYzls='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)