UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SxCOerBleDmQHRZ+a11+XyP1RAuJDWr0HV/VdtEvv/U='
WHERE
key_id = '86086cb27b299941ae76f9d31cc135ec180ed5b6a18b38344455cabf9ca1d155'
AND (
token = 'SxCOerBleDmQHRZ+a11+XyP1RAuJDWr0HV/VdtEvv/U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)