UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GFAiX8yQzemkUWxAKqSPu68xAk0VhevFQWnDWjKsDkQ=' 
WHERE 
  key_id = '1fd6372ef173ea99e17f8b1749ab6b9f8dc963b232bf39a4df438b3443fe4c90' 
  AND (
    token = 'GFAiX8yQzemkUWxAKqSPu68xAk0VhevFQWnDWjKsDkQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00067