UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wNDhf1DmyQHJCyo5Wxb4C/4EbhUYsdQ8zCIBSX7e2fY=' 
WHERE 
  key_id = '75b45ad7e8fd9b7863df3dbf58c824ea1ef099836c6485db4feb3259ba302f0b' 
  AND (
    token = 'wNDhf1DmyQHJCyo5Wxb4C/4EbhUYsdQ8zCIBSX7e2fY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029