UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LMM/X5nX94Hfe9KzR7UggpqNbQXLYYwHieIQud9NSRk='
WHERE
key_id = '0468c5116f1abcaae88afd526b3bb2729662fc9cb2c109a7abbdef7fe4c565a7'
AND (
token = 'LMM/X5nX94Hfe9KzR7UggpqNbQXLYYwHieIQud9NSRk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)