UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Gd3NPATOK3yTRJYVui05a+xNhxxh3rubI0JnNK/RPJg=' 
WHERE 
  key_id = 'f924d3ded96c7d0e95477491be8c49775769b0efca54452a3f3e570a4528c142' 
  AND (
    token = 'Gd3NPATOK3yTRJYVui05a+xNhxxh3rubI0JnNK/RPJg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047