UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nPZKwOwUy/VVbFALCW8VCQYMemwr3pZOPS/mF95bhY0=' 
WHERE 
  key_id = '245e73572a8e7d1ca8033056a5366e0a0bffb8a4f69d51fb5e010d945c3091e8' 
  AND (
    token = 'nPZKwOwUy/VVbFALCW8VCQYMemwr3pZOPS/mF95bhY0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023