UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9ZtBasn0PBBW/OKLbgR5z7q92gb9/HeltsjG4Q5a5MU=' 
WHERE 
  key_id = 'ec618df7411d3840c4c2af98862a26c5a29cfafa815c4a932d64bba6b17799c3' 
  AND (
    token = '9ZtBasn0PBBW/OKLbgR5z7q92gb9/HeltsjG4Q5a5MU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032