UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2R+Jtz7ZGk/DiKfddT7DaWzPzhIeeAtrdFq7LHggu/0=' 
WHERE 
  key_id = '880f8ff8c8cfdd23182f56eea8f1015a420beb4ced69ab7f0717f852957af6e4' 
  AND (
    token = '2R+Jtz7ZGk/DiKfddT7DaWzPzhIeeAtrdFq7LHggu/0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042