UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tpmD6xUjWyvdCBkmR68vJGVa61+J4o5HcyQBwzmY6fc=' 
WHERE 
  key_id = '296099f7f2658c36854c1e64a3862ea6d956d5d976eda98324933850d4db5e2e' 
  AND (
    token = 'tpmD6xUjWyvdCBkmR68vJGVa61+J4o5HcyQBwzmY6fc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031