UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gnkt3lEIm4vWt+9nqVb1jj3HPupBr1blfHKlIZ6FmBY='
WHERE
key_id = '56dd510752618f2c6aaa6cf275c3387eced3ac730fe0b7bf0589fa2a4386ad1f'
AND (
token = 'gnkt3lEIm4vWt+9nqVb1jj3HPupBr1blfHKlIZ6FmBY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)