UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zwxAHrFa+oOSAwllGGTat3OTKtgeDJ5P1l/4QqB6JGc='
WHERE
key_id = '97ceca60f8df42a5b52db8f6c8bfd24621839f527799410e207df3a4699d01d3'
AND (
token = 'zwxAHrFa+oOSAwllGGTat3OTKtgeDJ5P1l/4QqB6JGc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)