UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MRxRmlGBeinvxAtO2R2QDhWwDH50n9IysIg723q/vvU='
WHERE
key_id = '124542c35e62b77ad0b291f52ee38e1b7ee5ef5c114aa041570eeaba64c865ef'
AND (
token = 'MRxRmlGBeinvxAtO2R2QDhWwDH50n9IysIg723q/vvU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)