UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WigtIuFSNJ2Jlw2aKEHCGAGZLHeHDeBQ/7If/7lxPJ0='
WHERE
key_id = '6b89c827304b4898b31228312a914191a059ba43bc890563e5ad72465e7dde29'
AND (
token = 'WigtIuFSNJ2Jlw2aKEHCGAGZLHeHDeBQ/7If/7lxPJ0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)