UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FoYygjTGKGhlY9GbxmMhkdrmhTS25rw5V/ADMF682C4='
WHERE
key_id = '1c7cdf9ebfaae2601d93be02a66a2b0857e4c495aa09f716dbdc8be50b5b4992'
AND (
token = 'FoYygjTGKGhlY9GbxmMhkdrmhTS25rw5V/ADMF682C4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)